<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><?php $SITES = getcache('sitelist','commons'); ?>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="keywords" content="">
<meta name="description" content="">
<title>{$SITES[$siteid]['name']}</title>

<link type="text/css" rel="stylesheet" href="{CSS_PATH}style.css" />

<script type="text/javascript" src="{JS_PATH}jquery.js"></script>
<script type="text/javascript" src="{JS_PATH}scrolltopcontrol.js"></script><script language="javascript">  function imgdragstart(){return false;}  </script> 

</head>
<body>
<div class="top">
    	<a href="/" target="_self"><h1><script language="javascript" src="{APP_PATH}index.php?m=poster&c=index&a=show_poster&id=11"></script></h1></a>
    	<div class="center">
        	<div class="top_s"><a href="#">{GGAO_PATH}</a></div>
          <div class="top_x">
            	<input type="text" id="sousuo1" placeholder="품번검색:" /><span id="search1">search</span>
            </div>
        </div>
        <a href="javascript:;" id="dbright"><div class="right"><script language="javascript" src="{APP_PATH}index.php?m=poster&c=index&a=show_poster&id=12"></script></div></a>
</div>

<div class="nav">
	{pc:content action="category" catid="0" num="25" siteid="$siteid" order="listorder ASC"}
	{loop $data $r}
		<a href="javascript:;" onclick="cli('{$r[catid]}');" <?php if($r[catid]==$CATEGORYS[$top_parentid][catid]){echo 'class="cur"';} ?> ><dl style="font-weight:800;"><dt>{$r[catname]}</dt><dd>{$r[description]}</dd></dl></a>
	{/loop}
	{/pc}
</div> 
<div class="fen">
{pc:content action="category" catid="0" siteid="$siteid" order="listorder ASC"}
	{loop $data $r}
	<ul id="ulc_{$r[catid]}">
		{pc:content action="category" siteid="$siteid" catid="$r[catid]" num="8"  order="listorder ASC"}
		{loop $data $z}
    	<li <?php if($catid==$z[catid]){echo 'class="cur"';}?> ><a href="javascript:;" onclick="cli('{$z[catid]}');">{$z[catname]}</a></li>
    	{/loop}
		{/pc}
    </ul>
	{/loop}
{/pc}
</div>

<input type="hidden" id="hidden" value="">

<script type="text/javascript">

var $_GET = (function(){
    var url = window.document.location.href.toString();
    var u = url.split("?");
    if(typeof(u[1]) == "string"){
        u = u[1].split("&");
        var get = {};
        for(var i in u){
            var j = u[i].split("=");
            get[j[0]] = j[1];
        }
        return get;
    } else {
        return {};
    }
})();

	var $div_li = $(".nav a");
	$("#ulc_{$CATEGORYS[$top_parentid][catid]}").show().siblings().hide();
	$(".nav a").click(function(){
		var index = $div_li.index(this);
		$(this).addClass('cur').siblings().removeClass('cur');
		$(".fen > ul").eq(index).show().siblings().hide();
		$(".fen > ul").eq(index).children().eq(0).addClass('cur').siblings().removeClass('cur');
		
	});
	$(".fen > ul > li").click(function(){
		var index = $div_li.index(this);
		$(this).addClass('cur').siblings().removeClass('cur');	
	});

</script>
<style type="text/css">

.n_fe_t dl{
	display:block;
	width:260px;
	float:left;
}

.n_fe_t dl img { 
max-width:260px;
 max-height:260px; 
 scale:expression(
 (this.offsetWidth > this.offsetHeight)?(this.style.width = this.offsetWidth >= 260 ? "260px" : "auto"):(this.style.height = this.offsetHeight >= 260 ? "260px" : "auto"));
 display:inline !important;
 }

#xiangqye .limg {
	
	max-height:402px; 
	scale:expression(
	(this.offsetWidth > this.offsetHeight)?(this.style.width = this.offsetWidth >= 402 ? "402px" : "auto"):(this.style.height = this.offsetHeight >= 402 ? "402px" : "auto")); display:inline !important;}
#xiangqye .xqt .imgxq{
	max-width:1030px;
	height:auto;
	scale:expression(this.style.width = this.offsetWidth >= 1030 ? "1030" : "auto");

}
 
 </style>

<div class="xiangq" id="xiangqye">
	<div class="xq_s">
        <div class="left"><img class="limg" src="{$thumb}"/></div>
        <div class="right">
        	<ul>
            	<li>NO:<span>{$title}</span></li>
            	<li>KRW:<span style="color:red;font-size:28px;font-weight:800;">{$price}</span></li>
            	<li class="current">CoordiNO:<span>{$coordino}</span></li>
            </ul>
        
        </div>
	</div>
    
    <div class="xq_x">
    	<h3>商品详情说明</h3>		<a target="_blank" href="http://www.taobao.com/webww/ww.php?ver=3&touid=shenzhencn&siteid=cntaobao&status=1&charset=utf-8"><img border="0" src="http://amos.alicdn.com/online.aw?v=2&uid=shenzhencn&site=cntaobao&s=1&charset=utf-8" alt="点这里给我发消息" /></a>
        <?php				
			$con = explode('><',$content);			
		?>
		<?php foreach($con as $c){ if(!empty($c)){?>          		<?php  if(file_exists(iconv('UTF-8','GB2312',$_SERVER['DOCUMENT_ROOT']."/uploadfile/images/".$c)))		 {?>		 <p class="xqt" style="width:1030px"><img class="imgxq" src="/uploadfile/images/<?php echo $c?>" style="display:block;margin:auto"></p>		<?php }else		{						}
        
		 }} ?>
    </div>

</div>


<div class="fe_t" style="display:none;">
<div class="n_fe_t">
</div>
<div id="loading" style="display:none;"><img alt="Loading..." src="{IMG_PATH}loadingbar1.gif"><div></div></div>
</div><div id="daohang" style="width:1070px;margin:auto;display:none;" >        <div class="xq_x">	{pc:get sql="SELECT * FROM dh_page where catid=40"}	{loop $data $key $val}    	<h3 style="font-size:30px;font-weight:600;">{$val[title]}</h3>        <p>			{$val[content]}		</p>	{/loop}	{/pc}	    </div></div>
<input type="hidden" id="daoh" value="">
<script type="text/javascript" language="javascript"> for(i in document.images)document.images[i].ondragstart=imgdragstart;  
function cli(id){	$('#daohang').hide();	$('#daoh').val('');
	$('#xiangqye').css({display:'none'});
	$('.fe_t').css({display:'block'});
	$('#hidden').val(id);
	$('.n_fe_t').html('');
	$.post("index.php?m=content&c=index&a=liebiao", { "catid": id },function(data){
	$str = '';
		$info = data.res;
		for($i=0;$i<data.num;$i++){
			$str += "<dl><dt><h3><i>KRW:</i><span>"+$info[$i]['price']+"</span></h3><h4><i>NO:</i><span>"+$info[$i]['title']+"</span></h4></dt><dd style='margin:0px;padding:0px; vertical-align:middle;'><a href='"+$info[$i]['url']+"' target='_blank'><img src='"+$info[$i]['thumb']+"'  /></a></dd></dl>";
		}	
		$('.n_fe_t').append($str);
	}, "json");
}
$('#search1').click(function(){	$('#daoh').val('');	$('#daohang').hide();
	$text = $('#sousuo1').val();
	if($text==''){
		alert('搜索内容为空，请重新输入！');
		return false;
	}else{
		$('#xiangqye').css({display:'none'});
		$('.fe_t').css({display:'block'});
		$('.n_fe_t').html('');
		$.post("index.php?m=content&c=index&a=liebiao", { "search": $text },function(data){
			$str = '';
			$info = data.res;
			for($i=0;$i<data.num;$i++){
				$str += "<dl><dt><h3><i>KRW:</i><span>"+$info[$i]['price']+"</span></h3><h4><i>NO:</i><span>"+$info[$i]['title']+"</span></h4></dt><dd style='margin:0px;padding:0px; vertical-align:middle;'><a href='"+$info[$i]['url']+"' target='_blank'><img src='"+$info[$i]['thumb']+"'  /></a></dd></dl>";
			}	
			$('.n_fe_t').append($str);
		}, "json");	
	}
});
var $ci = 0;
$(window).scroll(function(){
	var height = document.documentElement.scrollTop || document.body.scrollTop;//当前高度
	var sheight = document.documentElement.clientHeight;//scroll高度
	var allheight = document.body.clientHeight;//总高度
	var cha = allheight-sheight;
	if((cha-height)<370){

		$text = $('#sousuo').val();
		$cat = $('#hidden').val();
		$daoh = $('#daoh').val();		if($daoh=='daoh'){			return false;		}else{			$ci++;		}
		$("#loading").css({display:'block'});
		$.post("index.php?m=content&c=index&a=liebiao", { "search": $text,"catid": $cat,"ci": $ci },function(data){
			$str = '';
			$info = data.res;
			for($i=0;$i<data.num;$i++){
				$str += "<dl><dt><h3><i>KRW:</i><span>"+$info[$i]['price']+"</span></h3><h4><i>NO:</i><span>"+$info[$i]['title']+"</span></h4></dt><dd style='margin:0px;padding:0px; vertical-align:middle;'><a href='"+$info[$i]['url']+"' target='_blank'><img src='"+$info[$i]['thumb']+"'  /></a></dd></dl>";
			}	
			$('.n_fe_t').append($str);
			$("#loading").css({display:'none'});
		}, "json");
	} 
});
$(document).keydown(function (event) {
	if(event.keyCode == 13){	$('#daoh').val('');
	$text = $('#sousuo').val();
		if($text==''){
			alert('搜索内容为空，请重新输入！');
			return false;
		}
		$('.n_fe_t').html('');
		$.post("index.php?m=content&c=index&a=liebiao", { "search": $text },function(data){
			$str = '';
			$info = data.res;
			for($i=0;$i<data.num;$i++){
				$str += "<dl><dt><h3><i>KRW:</i><span>"+$info[$i]['price']+"</span></h3><h4><i>NO:</i><span>"+$info[$i]['title']+"</span></h4></dt><dd style='margin:0px;padding:0px; vertical-align:middle;'><a href='"+$info[$i]['url']+"' target='_blank'><img src='"+$info[$i]['thumb']+"'  /></a></dd></dl>";
			}	
			$('.n_fe_t').append($str);
		}, "json");
	}
});
$('#dbright').click(function(){	/*$('#daoh').val('daoh');	$('#xiangqye').css({display:'block'});	$('.fe_t').css({display:'none'});	$('#xiangqye').html('');	$str="<iframe width='1070' height='2750' src='index.php?m=content&c=index&a=daoh' frameborder='0' scrolling='no' marginheight='0' marginwidth='0' > </iframe>";	$('#xiangqye').append($str);*/	$('#daoh').val('daoh');	$('#xiangqye').hide();	$('.fe_t').css({display:'none'});	$('#daohang').show();});
</script>
</body>
</html>




